package trism.game.model.common.stat.cells {
	/**
	 * @author Samoiloff  http://samoiloff.com/
	 */
	public class CellItem {
		
		
		private var _headRight:Boolean;
		
		private var _x:int;
		private var _y:int;
		
		private var _xCoord:int;
		private var _yCoord:int;
		
		public function CellItem() {
			super();
			
		}
		
		public function update(x : int, y : int) : void {
			_x = x;
			_y = y;
			
			_yCoord = _y * CellsItem.SIDE2;
			
			_xCoord = _x * CellsItem.MEDIAN;
			
			_headRight = Boolean((_x + _y) % 2);
			
			if (_headRight) {
				_xCoord -= (CellsItem.MEDIAN3);
			}
			
			
		}
		
		public function get x() : int {
			return _x;
		}
		
		public function get y() : int {
			return _y;
		}
		
		public function get headRight():Boolean {
			return _headRight;
		}

		public function get xCoord() : int {
			return _xCoord;
		}

		public function get yCoord() : int {
			return _yCoord;
		}

		

		
	}
}
